/**
 * Aistarfish.com Inc.
 * Copyright (c) 2017-2020 All Rights Reserved.
 */
package com.xf.constants;

/**
 *
 * @author xiangfeng
 * Created by on 2020-01-06 19:21
 */
public enum AppTypeEnum {

    PUBLIC(1,"公共"),
    BIZ_PLATFORM(2,"运营"),
    DEVELOP(3,"研发"),
    OTHER(99,"其它")
    ;

    public static AppTypeEnum getByType(Integer type){
        if(type == null){
            return null;
        }
        for(AppTypeEnum appTypeEnum:AppTypeEnum.values()){
            if(appTypeEnum.getType() == type){
                return appTypeEnum;
            }
        }
        return null;
    }

    AppTypeEnum(int type, String desc) {
        this.type = type;
        this.desc = desc;
    }

    private int type;

    private String desc;

    public int getType() {
        return type;
    }

    public void setType(int type) {
        this.type = type;
    }

    public String getDesc() {
        return desc;
    }

    public void setDesc(String desc) {
        this.desc = desc;
    }
}
